﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace $safeprojectname$.Binding
{
    public class ImportValueProvider : IValueProvider
    {
        public bool ContainsPrefix(string prefix)
        {
            return prefix.Equals("Abc")
                    ? true
                    : prefix.Equals("Def")
                        ? true
                        : prefix.Equals("Xyz")
                            ? true
                            : false;
        }

        public ValueProviderResult GetValue(string key)
        {
            if (key.Equals("Abc"))
            {
                return new ValueProviderResult("Abc", "Abc", CultureInfo.CurrentCulture);
            }
            if (key.Equals("Def"))
            {
                return new ValueProviderResult("Def", "Def", CultureInfo.CurrentCulture);
            }
            if (key.Equals("Xyz"))
            {
                return new ValueProviderResult(123, "123", CultureInfo.CurrentCulture);
            }
            return null;
        }
    }
}
